﻿<Window x:Class="Algoritmos_de_Ordenação.AlgDeOrdenacao"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     Title="Algoritmos de Ordenação" Height="600" Width="980" Background="Black" 
        ResizeMode="CanMinimize" Closing="Window_Closing" MinHeight="600" MinWidth="980">

    <Window.Resources>
        
        <ResourceDictionary>
            
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/CommomFunctions;component/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            
            <Style TargetType="{x:Type GroupBox}">
                <Setter Property = "HorizontalAlignment" Value="Left" />
                <Setter Property = "VerticalAlignment" Value="Bottom" />
            </Style>
            
            <Style TargetType="{x:Type Button}">
                <Setter Property = "Width" Value="80" />
                <Setter Property = "Height" Value="28" />
            </Style>
            
            <Style TargetType="{x:Type CheckBox}">
                <Setter Property = "Margin" Value="3,0,3,3" />
                <Setter Property = "Foreground" Value="LightGray" />
                <Setter Property = "IsChecked" Value="True" />
            </Style>
            
        </ResourceDictionary>
    
    </Window.Resources>

    <Grid Name="myGrid">
        
        <Canvas Background="Black" Name="cvMain" Margin="0,0,0,0">
        
            <GroupBox Height="89.991" Name="gbExibir" Width="136.653" Margin="95,430,0,0" Canvas.Left="-5.555" Canvas.Bottom="2">
                <GroupBox.Header>
                    <Label>Exibir</Label>
                </GroupBox.Header>
                <StackPanel>
                    <CheckBox Name="cbCSharp" Click="cbCSharp_Click">Código C#</CheckBox>
                    <CheckBox Name="cbCPlusPlus" Click="cbCPlusPlus_Click">Código C++</CheckBox>
                    <CheckBox Name="cbTrace" Click="cbTrace_Click">Trace de Execução</CheckBox>
                </StackPanel>
            </GroupBox>
            
            <GroupBox Height="152.207" Name="gbOrdem" Width="113.322" Margin="220,435,0,0" Canvas.Left="9.999" Canvas.Bottom="2">
                <GroupBox.Header>
                    <Label>Ordem</Label>
                </GroupBox.Header>
                <Canvas>
                    <Button Margin="11,4,0,0" Name="btnIncreasing" Click="btnIncreasing_Click">Crescente</Button>
                    <Button Margin="11,4,0,0" Canvas.Top="40" Name="btnDecreasing" Click="btnDecreasing_Click">Decrescente</Button>
                    <Button Margin="11,4,0,0" Canvas.Top="80" Name="btnRandom" Click="btnRandom_Click">Randômica</Button>
                </Canvas>
            </GroupBox>
            
            <GroupBox Height="152.207" Name="gbOperacoes" Width="195.536" Margin="0" Canvas.Bottom="2" Canvas.Left="347.743">
                <GroupBox.Header>
                    <Label>Operações</Label>
                </GroupBox.Header>
                <Canvas>
                    <Button Margin="3,4,0,0" Canvas.Left="3" Name="btnSort" Click="btnSort_Click">Ordena</Button>
                    <Button Margin="3,4,0,0" Canvas.Top="40" Canvas.Left="3" Name="btnPause" Click="btnPause_Click">Pausa</Button>
                    <Button Margin="3,4,0,0" Canvas.Top="80" Canvas.Left="3" Name="btnResume" Click="btnResume_Click">Resume</Button>
                    <Button Margin="0,4,3,0" Canvas.Top="0" Canvas.Right="3" Name="btnReset" Click="btnReset_Click">Reset</Button>
                    <Button Margin="0,4,3,0" Canvas.Top="40" Canvas.Right="3" Name="btnStop" Click="btnStop_Click">Para</Button>
                </Canvas>
            </GroupBox>
            
            <GroupBox Height="255" Name="gbCSharp" Width="407" Margin="50" Canvas.Left="502" Canvas.Top="-30">
                <GroupBox.Header>
                    <Label>C#</Label>
                </GroupBox.Header>
            </GroupBox>
            
            <GroupBox Height="255" Name="gbCPlusPlus" Width="407" Margin="50" Canvas.Left="502" Canvas.Top="236.643">
                <GroupBox.Header>
                    <Label>C++</Label>
                </GroupBox.Header>
            </GroupBox>
            
            <TextBox Name="tbInformations" Width="149.985" Height="69.993" Margin="50" Background="Transparent" Foreground="LawnGreen"  VerticalAlignment="Bottom" Canvas.Left="-45.551" Canvas.Top="311.08"/>
            
            <Menu Name="mainMenu" Canvas.Left="0" Canvas.Top="0" VerticalAlignment="Top" HorizontalAlignment="Left">
                
                <MenuItem Header="_Opções">
                    <MenuItem Name="velocityMenu" Header="_Velocidade de Ordenação" IsCheckable="False">
                        <MenuItem Name="smVerySlow" Header="Muito Devagar" Click="smVerySlow_Click"/>
                        <MenuItem Name="smSlow" Header="Devagar" Click="smSlow_Click"/>
                        <MenuItem Name="smNormal" Header="Normal" Click="smNormal_Click" IsChecked="True"/>
                        <MenuItem Name="smFast" Header="Rápido" Click="smFast_Click"/>
                        <MenuItem Name="smVeryFast" Header="Muito Rápido" Click="smVeryFast_Click"/>
                    </MenuItem>
                </MenuItem>
            
                <MenuItem Header="_Ajuda">
                    <MenuItem Name="help" Click="help_Click"  Header="Ajuda Algoritmos de Ordenação"/>
                    <MenuItem Name="tutorial" Click="tutorial_Click"  Header="Tutorial"/>
                    <MenuItem Name="about" Click="about_Click"  Header="Sobre"/>
                </MenuItem>

            </Menu>            
        </Canvas>
       
        <TabControl Name="tabControlMain" Background="Black"  SelectionChanged="tabControlMain_SelectionChanged">
            <TabItem Header="Bubble" Name="tabBubble"></TabItem>
            <TabItem Header="Heap" Name="tabHeap"></TabItem>
            <TabItem Header="Insertion" Name="tabInsertion"></TabItem>
            <TabItem Header="Quick" Name="tabQuick"></TabItem>
            <TabItem Header="Random Quick" Name="tabRandomQuick"></TabItem>
            <TabItem Header="Selection" Name="tabSelection"></TabItem>
            <TabItem Header="Shell" Name="tabShell"></TabItem>
            <TabItem Header="Compara Todos" Name="tabComparaTodos"></TabItem>
        </TabControl>
        
        <Canvas Name="cvCompareAll" Background="Black" Margin="0,1,0,-1">
            <TextBox Height="78" Canvas.Left="787" Canvas.Top="457" Width="168" TextWrapping="Wrap" HorizontalContentAlignment="Center" Background="Transparent" Foreground="LimeGreen" BorderBrush="Transparent" BorderThickness="0" FontSize="10.5">Obs: A velocidade de ordenamento da animação não está relacionada à complexidade do algoritmo que está sendo executado.</TextBox>
            
            <GroupBox Height="58" Width="313" Margin="220,435,0,0" Canvas.Left="-88" Canvas.Bottom="21">
                <GroupBox.Header>
                    <Label>Ordem</Label>
                </GroupBox.Header>

                <Canvas Background="Black">
                    <Button Height="24" Canvas.Top="-1" Canvas.Left="15" Name="caIncreasing" Click="btnIncreasing_Click">Crescente</Button>
                    <Button Height="24" Canvas.Top="-1" Canvas.Left="112" Name="caDecreasing" Click="btnDecreasing_Click">Decrescente</Button>
                    <Button Height="24" Canvas.Top="-1" Canvas.Left="209" Name="caRandom" Click="btnRandom_Click">Randômica</Button>
                </Canvas>
            </GroupBox>
            
            <GroupBox Height="87" Width="320" Margin="0" Canvas.Bottom="8" Canvas.Left="468">
                <GroupBox.Header>
                    <Label>Operações</Label>
                </GroupBox.Header>

                <Canvas>
                    <Button Height="24" Canvas.Top="0" Canvas.Left="12" Name="caSort" Click="btnSort_Click" >Ordena</Button>
                    <Button Height="24" Canvas.Top="30" Canvas.Left="115" Name="caPause" Click="btnPause_Click">Pausa</Button>
                    <Button Height="24" Canvas.Top="30" Canvas.Left="12" Name="caResume" Click="btnResume_Click">Resume</Button>
                    <Button Height="24" Canvas.Top="0" Canvas.Left="218" Name="caReset" Click="btnReset_Click">Reset</Button>
                    <Button Height="24" Canvas.Top="0" Canvas.Left="115" Name="caStop" Click="btnStop_Click">Para</Button>
                </Canvas>
            </GroupBox>
            
            <Menu Name="cAllMenu" Canvas.Left="0" Canvas.Top="0" VerticalAlignment="Top" HorizontalAlignment="Left">
                <MenuItem Header="_Opções">
                    <MenuItem Header="_Velocidade de Ordenação" IsCheckable="False">
                        <MenuItem Name="caVerySlow" Header="Muito Devagar" Click="smVerySlow_Click"/>
                        <MenuItem Name="caSlow" Header="Devagar" Click="smSlow_Click"/>
                        <MenuItem Name="caNormal" Header="Normal" Click="smNormal_Click" IsChecked="True"/>
                        <MenuItem Name="caFast" Header="Rápido" Click="smFast_Click"/>
                        <MenuItem Name="caVeryFast" Header="Muito Rápido" Click="smVeryFast_Click"/>
                    </MenuItem>
                </MenuItem>
                
                <MenuItem Header="_Ajuda">
                    <MenuItem Click="help_Click"  Header="Ajuda Algoritmos de Ordenação"/>
                    <MenuItem Click="tutorial_Click"  Header="Tutorial"/>
                    <MenuItem Click="about_Click"  Header="Sobre"/>
                </MenuItem>
            </Menu>
        </Canvas>

    </Grid>
</Window>

